package com.qen.sys

import cn.hutool.core.lang.Console
import cn.hutool.system.JvmSpecInfo
import cn.hutool.system.SystemUtil
import cn.hutool.system.oshi.CpuInfo
import cn.hutool.system.oshi.OshiUtil

fun main() {
    val cpu = OshiUtil.getCpuInfo()
    Console.log(cpu)
    val java = Java()
    Console.log(java)
}

class Java {
    var JvmSpecInfo: JvmSpecInfo = SystemUtil.getJvmSpecInfo()
        get() = field
        set(value) {
            field = value
        }


    var JvmInfo = SystemUtil.getJvmInfo()
        get() = field
        set(value) {
            field = value
        }

    var JavaSpecInfo = SystemUtil.getJavaSpecInfo()
        get() = field
        set(value) {
            field = value
        }

    var JavaInfo = SystemUtil.getJavaInfo()
        get() = field
        set(value) {
            field = value
        }

    var JavaRuntimeInfo = SystemUtil.getJavaRuntimeInfo()
        get() = field
        set(value) {
            field = value
        }

    var OsInfo = SystemUtil.getOsInfo()
        get() = field
        set(value) {
            field = value
        }

    var UserInfo = SystemUtil.getUserInfo()
        get() = field
        set(value) {
            field = value
        }

    var HostInfo = SystemUtil.getHostInfo()
        get() = field
        set(value) {
            field = value
        }

    var RuntimeInfo = SystemUtil.getRuntimeInfo()
        get() = field
        set(value) {
            field = value
        }

    constructor() {
        this.JvmSpecInfo = JvmSpecInfo
        this.JvmInfo = JvmInfo
        this.JavaSpecInfo = JavaSpecInfo
        this.JavaInfo = JavaInfo
        this.JavaRuntimeInfo = JavaRuntimeInfo
        this.OsInfo = OsInfo
        this.UserInfo = UserInfo
        this.HostInfo = HostInfo
        this.RuntimeInfo = RuntimeInfo
    }
}